{% extends 'EasyVoteBundle::layout.html.twig' %}
{% block title %}EasyVote | Search Results{% endblock %}

{% block content %}
    <div class="container" style="padding-top: 20px;">
        <div class="row row-centered">
            <div class="col-md-6 col-centered">
                <div class="panel panel-default">
                    <div class="panel-heading panel-title">Search Results: (Click on the image to select) </div>
                    <div class="panel-body">
                    
						{# SHOW THE QUERY RESULTS #}
						<ul class="media-list">
							{% for qr in query_results if qr.profile != null %}
								<li class="media">
									<a class="pull-left" href="{{ path('profile_show', {'id': qr.id }) }}"><img src="{{ qr.profile ? qr.profile.picture }}" width="200px" height="200px"></a>
																		
									{# Show the results name, euid, affiliation, classification, and degree #}
									<div class="media-body">
										<h4 class="media-heading"><a href="{{ path('profile_show', {'id': qr.id}) }}">{{ qr.displayName }} ({{ qr.euid }})</a></h4>
										<ul class="list-group">
											<li class="list-group-item"><strong>Degree:</strong> 
												{% for degree in qr.degrees %}
													{{ degree.displayName|capitalize }}{% if degree != loop.last %},{% endif %}
												{% endfor %}
											</li>
											<li class="list-group-item"><strong>Summary:</strong>
												{{ qr.profile ? qr.profile.summary }}
											</li>
										</ul>
									</div>
								</li>
							{% endfor %}
						</ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
